package com.lagou.edu.factory;

public class ClassPathXmlApplicationContext {
    BeanFactory beanFactory;
    public ClassPathXmlApplicationContext(String configLocation) {
        beanFactory = BeanFactory.createBeanFactory(configLocation);
    }

    public Object getBean(String id) {
        return beanFactory.getBean(id);
    }

    public Object getBean(Class type) {
        return beanFactory.getBean(type);
    }
}
